package com.spring.framework.config.life;

import lombok.ToString;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * 长生命周期 bean
 *
 * @author xuweizhi
 * @since 2020/12/15 10:03
 */
@ToString
@Component
public class Singleton {

	@Resource
	private Prototype prototype;

	public void setPrototype(Prototype prototype) {
		this.prototype = prototype;
	}

	// @Lookup
	public Prototype getPrototype() {
		return prototype;
	}
}
